package com.example.administrator.pregnancyassistence.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.example.administrator.pregnancyassistence.R;
import com.example.administrator.pregnancyassistence.constants.JumpConstants;
import com.example.administrator.pregnancyassistence.util.AssetsUtil;

public class ShowNewsContentActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news_content);
        initView();
        initListener();
    }

    private void initListener() {

    }

    private void initView() {
        String newsTitle = getIntent().getStringExtra(JumpConstants.NEWS_TITLE);
        TextView tv_news_title = findViewById(R.id.tv_news_title);
        TextView tv_news_content = findViewById(R.id.tv_news_content);
        tv_news_title.setText(newsTitle);
        String newsContent = AssetsUtil.getNewsJson(this,"news_content");
        tv_news_content.setText(newsContent);

    }
}
